#ifndef SDK_OHOS_OHOS_MEDIA_TRACK_H_
#define SDK_OHOS_OHOS_MEDIA_TRACK_H_

#include <string>
#include "api/media_stream_interface.h"
#include "rtc_base/logging.h"
#include "rtc_base/thread.h"
#include "api/ohos_media_track_interface.h"

namespace ohoswebrtc {

class OHOSMediaTrack : public OHOSMediaTrackInterface {
  public:
    OHOSMediaTrack(rtc::scoped_refptr<webrtc::MediaStreamTrackInterface> track);
    virtual ~OHOSMediaTrack();
    /**
    * The kind of track. For example, "audio" if this track represents an audio
    * track and "video" if this track represents a video track.
    */
    const std::string kind() const override { return kind_; }
    /** An identifier string. */
    const std::string id() const override { return id_; }
    /** The enabled state of the track. */
    bool enabled() const override { return track_->enabled(); }
    /** set enabled state of the track. */
    bool set_enabled(bool enable) override {
      return track_->set_enabled(enable);
    }
    /** The state of the track. */
    OHOSMediaTrackState state() const override {
      return static_cast<OHOSMediaTrackState>(track_->state());
    }
    /**
     * MediaStreamTrackInterface representation of this OHOSMediaTrack object. This is
     * needed to pass to the underlying C++ APIs.
     */
    rtc::scoped_refptr<webrtc::MediaStreamTrackInterface> track() override {
      return track_;
    }

  private:
    rtc::scoped_refptr<webrtc::MediaStreamTrackInterface> track_;
    std::string id_; 
    std::string kind_;
};

}

#endif